#include "GSharpGenericStruct.h"
#include "Reflection/PlaceholderType.h"
#include "Reflection/GenericInfo.h"
#include "Reflection/PropertyList.h"
#include "Reflection/Property.h"
#include "GSharpFieldProperty.h"
#include "Reflection/FunctionList.h"
#include "Reflection/Function.h"
#include "Reflection/PlaceholderInfo.h"

CGSharpGenericStruct::CGSharpGenericStruct(
    const STypeID &InTypeID
    , const TVector<STypeID> & InPlaceholders
    )
: CGSharpStruct(
    InTypeID
    ,ETypeFlags::Generic
    )
{
    PostConstructFunction=nullptr;

    GenericInfo= new CGenericInfo();
    //create placeholders
    for(int32_t i=0;i<InPlaceholders.Num();i++)
    {
        STypeID PlaceholderTypeID=InPlaceholders[i];

        CPlaceholderType* PlaceholderType= 
            new CPlaceholderType(
                PlaceholderTypeID      
                ,ETypeFlags::Script
                ,i
                ,this
                );

        GenericInfo->PlaceholderTypes.Add(PlaceholderType); 
    }

}
